package com.shrfid.module_base.entity;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * 身份证信息
 */
public class IdCardEntity implements Parcelable {
    private String name;
    private String sex;
    private String nation;
    private String birth;
    private String address;
    private String no;
    private Bitmap bitmap;
    private String expire;
    private String extraNo;

    public String getExtraNo() {
        return extraNo;
    }

    public void setExtraNo(String extraNo) {
        this.extraNo = extraNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Bitmap getBitmap() {
        return bitmap;
    }

    public void setBitmap(Bitmap bitmap) {
        this.bitmap = bitmap;
    }

    public String getExpire() {
        return expire;
    }

    public void setExpire(String expire) {
        this.expire = expire;
    }

    @Override
    public String toString() {
        return "IdCardEntity{" +
                "name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", nation='" + nation + '\'' +
                ", birth='" + birth + '\'' +
                ", address='" + address + '\'' +
                ", no='" + no + '\'' +
                ", bitmap=" + bitmap +
                ", expire='" + expire + '\'' +
                ", extraNo='" + extraNo + '\'' +
                '}';
    }

    public IdCardEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.sex);
        dest.writeString(this.nation);
        dest.writeString(this.birth);
        dest.writeString(this.address);
        dest.writeString(this.no);
        dest.writeParcelable(this.bitmap, flags);
        dest.writeString(this.expire);
        dest.writeString(this.extraNo);
    }

    protected IdCardEntity(Parcel in) {
        this.name = in.readString();
        this.sex = in.readString();
        this.nation = in.readString();
        this.birth = in.readString();
        this.address = in.readString();
        this.no = in.readString();
        this.bitmap = in.readParcelable(Bitmap.class.getClassLoader());
        this.expire = in.readString();
        this.extraNo = in.readString();
    }

    public static final Creator<IdCardEntity> CREATOR = new Creator<IdCardEntity>() {
        @Override
        public IdCardEntity createFromParcel(Parcel source) {
            return new IdCardEntity(source);
        }

        @Override
        public IdCardEntity[] newArray(int size) {
            return new IdCardEntity[size];
        }
    };
}
